<?php

/*
 * REQUIRE CONFIGURATION FILE
 */

require_once(__DIR__ . '/config.php');


/*
 *  REQUIRE DEFINITIONS
 */

require_once(__DIR__ . '/definitions.php');


/*
 *  REQUIRE FUNCTIONS
 */

require_once(__DIR__ . '/functions.php');


/*
 *  IMPORT CLASSES
 */

require_once(LIB_PATH . '/ts_db.php');
require_once(LIB_PATH . '/ts_framework.php');
require_once(LIB_PATH . '/ts_modules.php');


/*
 * INIT
 */

session_start();

$ts_db = new ts_db(DB_NAME);
$ts_framework = new ts_framework();
$ts_modules = new ts_modules();

if(!$ts_db->connect(DB_HOST , DB_USER , DB_PASS)){
    exit('Error connecting to the database.');
}

?>
